﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using sexhealth.console.service.common.vo;
using sexhealth.console.service.post;

public partial class admin_UC01_0108websetting : System.Web.UI.Page
{
    PostService postService = new PostService();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            WebVO webDescription = postService.DaoGetVOById<WebVO>(1);
            WebVO webKeywords = postService.DaoGetVOById<WebVO>(2);
            txtDescription.Text = webDescription.Value;
            txtKeywords.Text = webKeywords.Value;
        }
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        WebVO webDescription = postService.DaoGetVOById<WebVO>(1);
        WebVO webKeywords = postService.DaoGetVOById<WebVO>(2);
        webDescription.Value = txtDescription.Text;
        webKeywords.Value = txtKeywords.Text;
        postService.DaoUpdate(webDescription);
        postService.DaoUpdate(webKeywords);

    }
}
